package org.example.smartEducationBackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.smartEducationBackend.entity.DTO.UserDTO;
import org.example.smartEducationBackend.entity.POJO.Resource;
import org.example.smartEducationBackend.entity.POJO.UserAccount;

@Mapper
public interface UserMapper extends BaseMapper<UserAccount> {
    @Select("select user_id,user_name,password,role from user_accounts where user_name=#{username} and password =#{password}")
    UserDTO selectByUser(UserDTO userDTO);
    @Select("select * from user_accounts where user_id = #{id}")
    UserAccount selectById(Integer id);
}
